package homework.api.day08;

public class ThrowDemo {
    public static void main(String[] args) {
        try{
            Student s = new Student();
            s.setAge(1000);
            System.out.println("此人年龄"+s.getAge()+"岁");
        }catch (Exception e){
            System.out.println("此人年龄不合法");
        }
    }
}
